    <!-- *** CUT top -->
    <table width="1000"  border="0" cellspacing="0" cellpadding="0" class="form" id="vpage_template_top_table">
        <tr>
            <td align="left">
                <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td>
                            <div class="form_title">Virtual Page Template</div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <!-- If you don't want notes erase this START -->
        <tr>
            <td>
                <table width="100%"  border="0" cellspacing="0" cellpadding="0" class="form_note">
                    <!-- Repeat this fo additional notes START -->
                    <tr>
                        <td valign="top" align="left">
                            <table width="100%"  border="0" cellspacing="0" cellpadding="4" class="form_note_title">
                                <tr>
                                    <td><img src="img/modules/form_html_tpl_static_ajax_metallic/exclamation_mark.png" border="0" alt="icon exclamation mark"  width="16" height="16" /></td>
                                    <td width="100%" align="left">Note:</td>
                                </tr>
                            </table>
                        </td>
                        <td align="left" width="99%">
                            <div class="form_note_text">Fields marked with &quot;*&quot; are mandatory.</div>
                        </td>
                    </tr>
                    <!-- Repeat this fo additional notes END-->
                </table>
            </td>
        </tr>
        <!-- If you don't want notes erase this END -->
        <tr>
            <td>
                <div id="vpage_template">
                    <form onsubmit="submit_ajax_vpage_template(); return false;" action="admin/modules/tangra_cms/vpage/vpage_template_edit.php" method="post" name="vpage_template_form" enctype="application/x-www-form-urlencoded">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td align="left">
                                    <table width="100%"  border="0" cellspacing="0" cellpadding="0" class="form_row">
                                        <tr>
                                            <td class="form_even_row">
                                                <!-- form_field_text vpage_template_name START-->
                                                <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                                                    <tr>
                                                        <td width="180">
                                                            <div align="right">Template name*:</div>
                                                        </td>
                                                        <td width="1%">
                                                            <input class="form" name="vpage_template_name" type="text" value="{$vpage_template_name_val}" maxlength="255" size="40" id="vpage_template_name"/>
                                                        </td>
                                                        <td>&nbsp;</td>
                                                    </tr>
                                                    {if $vpage_template_name_has_error}
                                                    <!-- Potential errors START -->
                                                    {if $vpage_template_name_error_mandatory_missing}
                                                    <!-- mandatory_missing START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Field is mandatory.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- mandatory_missing END -->
                                                    {/if}
                                                    {if $vpage_template_name_error_max_length_exceeded}
                                                    <!-- max_length_exceeded START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Allowed maximum of 255 characters exceeded.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- max_length_exceeded END -->
                                                    {/if}
                                                    <!-- Potential errors END -->
                                                    {/if}
                                                </table>
                                                <!-- form_field_text vpage_template_name END-->
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="form_odd_row">
                                                <!-- form_field_text vpage_template_wp_path START-->
                                                <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                                                    <tr>
                                                        <td width="180">
                                                            <div align="right">WP Path*:</div>
                                                        </td>
                                                        <td width="1%">
                                                            <input class="form" name="vpage_template_wp_path" type="text" value="{$vpage_template_wp_path_val}" maxlength="255" size="75" id="vpage_template_wp_path"/>
                                                        </td>
                                                        <td>Relative to {$hidden_path}</td>
                                                    </tr>
                                                    {if $vpage_template_wp_path_has_error}
                                                    <!-- Potential errors START -->
                                                    {if $vpage_template_wp_path_error_mandatory_missing}
                                                    <!-- mandatory_missing START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Field is mandatory.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- mandatory_missing END -->
                                                    {/if}
                                                    {if $vpage_template_wp_path_error_max_length_exceeded}
                                                    <!-- max_length_exceeded START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Allowed maximum of 255 characters exceeded.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- max_length_exceeded END -->
                                                    {/if}
                                                    {if $vpage_template_wp_path_error_file_not_exist}
                                                    <!-- file_not_exist START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: {$hidden_path}{$wp_path} does not exist.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- file_not_exist END -->
                                                    {/if}                                                    
                                                    <!-- Potential errors END -->
                                                    {/if}
                                                </table>
                                                <!-- form_field_text vpage_template_wp_path END-->
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="form_even_row">
                                                <!-- form_field_text vpage_template_wp_class_name START-->
                                                <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                                                    <tr>
                                                        <td width="180">
                                                            <div align="right">WP class name*:</div>
                                                        </td>
                                                        <td width="1%">
                                                            <input class="form" name="vpage_template_wp_class_name" type="text" value="{$vpage_template_wp_class_name_val}" maxlength="255" size="40" id="vpage_template_wp_class_name"/>
                                                        </td>
                                                        <td>&nbsp;</td>
                                                    </tr>
                                                    {if $vpage_template_wp_class_name_has_error}
                                                    <!-- Potential errors START -->
                                                    {if $vpage_template_wp_class_name_error_mandatory_missing}
                                                    <!-- mandatory_missing START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Field is mandatory.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- mandatory_missing END -->
                                                    {/if}
                                                    {if $vpage_template_wp_class_name_error_max_length_exceeded}
                                                    <!-- max_length_exceeded START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Allowed maximum of 255 characters exceeded.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- max_length_exceeded END -->
                                                    {/if}
                                                    <!-- Potential errors END -->
                                                    {/if}
                                                </table>
                                                <!-- form_field_text vpage_template_wp_class_name END-->
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="form_odd_row">
                                                <!-- form_field_text vpage_template_page_name START-->
                                                <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                                                    <tr>
                                                        <td width="180">
                                                            <div align="right">HTML Template resource*:</div>
                                                        </td>
                                                        <td width="1%">
                                                            <input class="form" name="vpage_template_page_name" type="text" value="{$vpage_template_page_name_val}" maxlength="255" size="40" id="vpage_template_page_name"/>
                                                        </td>
                                                        <td>&nbsp;</td>
                                                    </tr>
                                                    {if $vpage_template_page_name_has_error}
                                                    <!-- Potential errors START -->
                                                    {if $vpage_template_page_name_error_mandatory_missing}
                                                    <!-- mandatory_missing START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Field is mandatory.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- mandatory_missing END -->
                                                    {/if}
                                                    {if $vpage_template_page_name_error_max_length_exceeded}
                                                    <!-- max_length_exceeded START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Allowed maximum of 255 characters exceeded.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- max_length_exceeded END -->
                                                    {/if}
                                                    <!-- Potential errors END -->
                                                    {/if}
                                                </table>
                                                <!-- form_field_text vpage_template_page_name END-->
                                            </td>
                                        </tr>    
                                        <tr>
                                            <td class="form_even_row">
                                                <!-- form_field_text vpage_template_edit_path START-->
                                                <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                                                    <tr>
                                                        <td width="180">
                                                            <div align="right">VPage edit page path:</div>
                                                        </td>
                                                        <td width="1%">
                                                            <input class="form" name="vpage_template_edit_path" type="text" value="{$vpage_template_edit_path_val}" maxlength="255" size="75" id="vpage_template_edit_path"/>
                                                        </td>
                                                        <td>Relative to {$htdocs_path}</td>
                                                    </tr>
                                                    {if $vpage_template_edit_path_has_error}
                                                    <!-- Potential errors START -->
                                                    {if $vpage_template_edit_path_error_mandatory_missing}
                                                    <!-- mandatory_missing START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Field is mandatory.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- mandatory_missing END -->
                                                    {/if}
                                                    {if $vpage_template_edit_path_error_max_length_exceeded}
                                                    <!-- max_length_exceeded START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Allowed maximum of {$edit_path_max_length} characters exceeded.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- max_length_exceeded END -->
                                                    {/if}
                                                    {if $vpage_template_edit_path_error_file_not_exist_ht}
                                                    <!-- file_not_exist_ht START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Cannot find such file.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- file_not_exist_ht END -->
                                                    {/if}
                                                    <!-- Potential errors END -->
                                                    {/if}
                                                </table>
                                                <!-- form_field_text vpage_template_edit_path END-->
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="form_odd_row">
                                                <!-- form_field_text vpage_template_man_path START-->
                                                <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                                                    <tr>
                                                        <td width="180">
                                                            <div align="right">VPage manage page path:</div>
                                                        </td>
                                                        <td width="1%">
                                                            <input class="form" name="vpage_template_man_path" type="text" value="{$vpage_template_man_path_val}" maxlength="255" size="75" id="vpage_template_man_path"/>
                                                        </td>
                                                        <td>Relative to {$htdocs_path}</td>
                                                    </tr>
                                                    {if $vpage_template_man_path_has_error}
                                                    <!-- Potential errors START -->
                                                    {if $vpage_template_man_path_error_mandatory_missing}
                                                    <!-- mandatory_missing START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Field is mandatory.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- mandatory_missing END -->
                                                    {/if}
                                                    {if $vpage_template_man_path_error_max_length_exceeded}
                                                    <!-- max_length_exceeded START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Allowed maximum of {$man_path_max_length} characters exceeded.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- max_length_exceeded END -->
                                                    {/if}
                                                    {if $vpage_template_man_path_error_file_not_exist_ht}
                                                    <!-- file_not_exist_ht START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Cannot find such file.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- file_not_exist_ht END -->
                                                    {/if}
                                                    <!-- Potential errors END -->
                                                    {/if}
                                                </table>
                                                <!-- form_field_text vpage_template_man_path END-->
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="form_even_row">
                                                <!-- form_field_text vpage_template_del_path START-->
                                                <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                                                    <tr>
                                                        <td width="180">
                                                            <div align="right">VPage delete page path:</div>
                                                        </td>
                                                        <td width="1%">
                                                            <input class="form" name="vpage_template_del_path" type="text" value="{$vpage_template_del_path_val}" maxlength="255" size="75" id="vpage_template_del_path"/>
                                                        </td>
                                                        <td>Relative to {$htdocs_path}</td>
                                                    </tr>
                                                    {if $vpage_template_del_path_has_error}
                                                    <!-- Potential errors START -->
                                                    {if $vpage_template_del_path_error_mandatory_missing}
                                                    <!-- mandatory_missing START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Field is mandatory.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- mandatory_missing END -->
                                                    {/if}
                                                    {if $vpage_template_del_path_error_max_length_exceeded}
                                                    <!-- max_length_exceeded START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Allowed maximum of {$del_path_max_length} characters exceeded.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- max_length_exceeded END -->
                                                    {/if}
                                                    {if $vpage_template_del_path_error_file_not_exist_ht}
                                                    <!-- file_not_exist_ht START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Cannot find such file.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- file_not_exist_ht END -->
                                                    {/if}
                                                    <!-- Potential errors END -->
                                                    {/if}
                                                </table>
                                                <!-- form_field_text vpage_template_del_path END-->
                                            </td>
                                        </tr>                                         
                                        <tr><td>&nbsp;</td></tr>
                                        <tr><td><strong>Cache settings for pages that are based on this template:</strong></td></tr>
                                        <tr>
                                            <td class="form_even_row">
                                                <!-- form_field_checkboxvpage_template_cache START-->
                                                <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                                                    <tr>
                                                        <td width="180">
                                                            <div align="right">Caching enabled?:</div>
                                                        </td>
                                                        <td width="1%">
                                                            <input class="form" name="vpage_template_cache" type="checkbox" value="{$vpage_template_cache_val}"{if $vpage_template_cache_checked} checked="checked"{/if} id="vpage_template_cache" />
                                                        </td>
                                                        <td>&nbsp;</td>
                                                    </tr>
                                                    {if $vpage_template_cache_has_error}
                                                    <!-- Potential errors START -->
                                                    {if $vpage_template_cache_error_mandatory_missing}
                                                    <!-- mandatory_missing START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Field is mandatory.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- mandatory_missing END -->
                                                    {/if}
                                                    <!-- Potential errors END -->
                                                    {/if}
                                                </table>
                                                <!-- form_field_checkbox vpage_template_cache END-->
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="form_odd_row">
                                                <!-- form_field_integer_positive vpage_template_cache_expiry START-->
                                                <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                                                    <tr>
                                                        <td width="180">
                                                            <div align="right">Cache expiry (seconds):</div>
                                                        </td>
                                                        <td width="1%">
                                                            <input class="form" name="vpage_template_cache_expiry" type="text" value="{$vpage_template_cache_expiry_val}" maxlength="100" size="6" id="vpage_template_cache_expiry" />
                                                        </td>
                                                        <td>
                                                            <div align="left"><span style="white-space:nowrap">0 = use <a href="admin/modules/tangra_cms/settings/settings.php/_lang-en/" target="_blank">default global setting</a>. Negative = never expiry</span></div>
                                                        </td>
                                                    </tr>
                                                    {if $vpage_template_cache_expiry_has_error}
                                                    <!-- Potential errors START -->
                                                    {if $vpage_template_cache_expiry_error_mandatory_missing}
                                                    <!-- mandatory_missing START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Field is mandatory.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- mandatory_missing END -->
                                                    {/if}
                                                    {if $vpage_template_cache_expiry_error_max_length_exceeded}
                                                    <!-- max_length_exceeded START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Allowed maximum of {$cache_expiry_max_length} characters exceeded.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- max_length_exceeded END -->
                                                    {/if}
                                                    {if $vpage_template_cache_expiry_error_not_a_number}
                                                    <!-- not_a_number START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Must be number.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- not_a_number END -->
                                                    {/if}
                                                    {if $vpage_template_cache_expiry_error_not_an_integer}
                                                    <!-- not_an_integer START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Must be integer value.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- not_an_integer END -->
                                                    {/if}
                                                    {if $vpage_template_cache_expiry_error_integer_not_positive}
                                                    <!-- integer_not_positive START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Value must be positive.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- integer_not_positive END -->
                                                    {/if}
                                                    <!-- Potential errors END -->
                                                    {/if}
                                                </table>
                                                <!-- form_field_integer_positive vpage_template_cache_expiry END-->
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="form_even_row">
                                                <!-- form_field_checkboxvpage_template_hard_cache START-->
                                                <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                                                    <tr>
                                                        <td width="180">
                                                            <div align="right">Are above cache settings mandatory for pages?:</div>
                                                        </td>
                                                        <td width="1%">
                                                            <input class="form" name="vpage_template_hard_cache" type="checkbox" value="{$vpage_template_hard_cache_val}"{if $vpage_template_hard_cache_checked} checked="checked"{/if} id="vpage_template_hard_cache" />
                                                        </td>
                                                        <td>If checked you will not be able to change cache settings per page basis</td>
                                                    </tr>
                                                    {if $vpage_template_hard_cache_has_error}
                                                    <!-- Potential errors START -->
                                                    {if $vpage_template_hard_cache_error_mandatory_missing}
                                                    <!-- mandatory_missing START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Field is mandatory.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- mandatory_missing END -->
                                                    {/if}
                                                    <!-- Potential errors END -->
                                                    {/if}
                                                </table>
                                                <!-- form_field_checkbox vpage_template_hard_cache END-->
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="form_odd_row">
                                                <!-- form_field_checkboxvpage_template_update START-->
                                                <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                                                    <tr>
                                                        <td width="180">
                                                            <div align="right">Update existing pages with above settings:</div>
                                                        </td>
                                                        <td width="1%">
                                                            <input class="form" name="vpage_template_update" type="checkbox" value="{$vpage_template_update_val}"{if $vpage_template_update_checked} checked="checked"{/if} id="vpage_template_update" />
                                                        </td>
                                                        <td>If checked all pages based on this template will be updated with above settings on save.</td>
                                                    </tr>
                                                    {if $vpage_template_update_has_error}
                                                    <!-- Potential errors START -->
                                                    {if $vpage_template_update_error_mandatory_missing}
                                                    <!-- mandatory_missing START -->
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <div class="form_error_message">Error: Field is mandatory.</div>
                                                        </td>
                                                    </tr>
                                                    <!-- mandatory_missing END -->
                                                    {/if}
                                                    <!-- Potential errors END -->
                                                    {/if}
                                                </table>
                                                <!-- form_field_checkbox vpage_template_update END-->
                                            </td>
                                        </tr>                                                                              
                                    </table>
                                    <input type="hidden" name="vpage_template_form_id" value="{$vpage_template_form_id_val}" id="vpage_template_form_id"/>
                                    <input type="hidden" name="vpage_template_guard_value" value="{$vpage_template_guard_value_val}" id="vpage_template_guard_value"/>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="submit_row">
                                        <tr>
                                            <td width="180">&nbsp;</td>
                                            <td width="100" align="left">
                                                <input name="vpage_template_submit" type="submit" value="Save" class="form_submit" />
                                            </td>
                                            <td width="50">&nbsp;</td>
                                            <td>
                                                <div class="form_cancel"><a href="{if $add_new}admin/modules/tangra_cms/vpage/vpage_templates.php{else}admin/modules/tangra_cms/vpage/vpage_template_manage.php?manage={$vpage_template_id}{/if}">Cancel</a></div>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </form>
                </div>
            </td>
        </tr>
    </table>
    <!-- *** CUT bottom -->
